<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>  
  <body>
	<object id="gg" width="0" height="0" classid="CLSID:2ABA835A-91F2-4CD0-9B49-BD9472D816D3" codebase=""></object>
	<script language="javascript">
    	var flag = 0;
		function enterroom(){
			var version;
			try{
		version = GetVersion();
	
		if(parseFloat(version)<3.0) {
			flag= 1;
		}else{
			flag= 2;
		}
	} catch(e){
		flag= 0;
	}
}

function GetVersion()
{
	var o = document.getElementById("gg");
	return o.GetVersion();
	//return document.all.gg.GetVersion();
}
enterroom();
var condition  = window.location.href;
condition = condition.substring(condition.indexOf("?")+1);

if(flag ==2){//cs
	var tidStr = "&id=";
	var id = condition.substring(condition.indexOf(tidStr)+tidStr.length);
	window.location.href="guaguaroom:"+id;
}else{//bs
	window.open("http://chat.17guagua.net/enterroom.jsp?"+condition);
}
    </script>
  </body>
</html>
